package org.apache.kafka.message.demo;

import org.apache.kafka.message.MessageGenerator;

import java.util.ArrayList;
import java.util.List;

public class MainCommonMessageDemo {
    public static void main(String[] args) throws Exception {
        MessageGenerator messageGenerator = new MessageGenerator();
        String packageName = "org.apache.kafka.common.message";
        String outputDir = "kafka-clients/src/main/java/org/apache/kafka/common/message";
        String inputDir = "kafka-clients/src/main/resources/common/message";
        List<String> typeClassGeneratorTypes = new ArrayList<>();
        typeClassGeneratorTypes.add("MetadataJsonConvertersGenerator");
        typeClassGeneratorTypes.add("ApiMessageTypeGenerator");
        List<String> messageClassGeneratorTypes = new ArrayList<>();
        messageClassGeneratorTypes.add("MessageDataGenerator");
        messageGenerator.processDirectories(packageName, outputDir, inputDir, typeClassGeneratorTypes, messageClassGeneratorTypes);
    }
}
